// JQuery方法定制
(function($) {

    //表单实例化
    $.fn.serializeJson = function () {
        var serializeObj = {};
        var array = this.serializeArray();
        $(array).each(
            function () {
                if (serializeObj[this.name]) {
                    if ($.isArray(serializeObj[this.name])) {
                        serializeObj[this.name].push(this.value);
                    } else {
                        serializeObj[this.name] = [
                            serializeObj[this.name], this.value];
                    }
                } else {
                    serializeObj[this.name] = this.value;
                }
            });
        return serializeObj;
    };


}(jQuery))

var ____clientName = "chudy_visual";
const node_config_app = new node_Conf({"configName":____clientName + "_" + isDev});

var Lib = function () { }
Lib.getStorage = function (key) {
    return node_config_app.get(key);
}
Lib.setStorage = function (key, data, cb) {
    //node_config_app.delete(key);
    node_config_app.set(key, data);
    return true;
}
Lib.delStorage = function(key){
    node_config_app.delete(key);
}

Lib.getRequestHeaders = function(){
    //Lib.delStorage('_token');
    var _token = Lib.getStorage('_token');
    var _deviceId = Lib.getStorage('_deviceId');
    //var _tenantId = Lib.getStorage('_tenantId');
    return {"sessionkey": _token,"imei":_deviceId};
}

